/*oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO*/
//								Clock Module
/*oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO*/

#ifndef CLOCK_MODULE
#define CLOCK_MODULE

#include <WinSock2.h>
#include "Types.h"


/*oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO*/
//								Functions
/*oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO*/
/*
 * MainClock
 * =========================
 * Function Description: This is the main function of the clock. It will start the server, 
 *                       accept connections from the clients, and will then:
 *                                - Notify all nodes on beginning of a round
 *                                - Wait for all nodes to notify that the round has ended
 * Arguments: argc		The number of passed arguments. passed on from the "main" function.
 * 			  argv		The arguments, passed on from the "main" function. See specific list of arguments below. 
 * 
 * List of arguments the clock expects in argv:
 * 			- Mode Name					A string containing the name of the mode. "Clock" is expected in this case.
 * 			- Self i.p					A string of the i.p address of the clock. For example 127.0.0.1.
 * 			- Self Port					An integer representing the port number of the clock.
 * 			- Total number of nodes		An integer representing the the number of clients that will be connected to the clock 
 *                                      (The number of working processes excepts for the clock).
 */
void MainClock(int argc, char *argv[]);

#endif
